package o;

import android.text.TextUtils;
import com.huawei.hms.common.data.DataBufferSafeParcelable;
import org.json.JSONException;
import org.json.JSONObject;

public class fnp {
    private int ˊ = -2;
    private String ˏ;

    private fnp() {
    }

    public int ˎ() {
        return this.ˊ;
    }

    public String ˊ() {
        return this.ˏ;
    }

    public static fnp ॱ(String str) {
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        fnp o_fnp = new fnp();
        try {
            JSONObject jSONObject = new JSONObject(str);
            o_fnp.ˊ = jSONObject.optInt("code", -2);
            o_fnp.ˏ = jSONObject.optString(DataBufferSafeParcelable.DATA_FIELD, "");
            return o_fnp;
        } catch (JSONException e) {
            return o_fnp;
        }
    }
}
